﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Style x:Key="EditableComboBoxItemStyle" TargetType="{x:Type ComboBoxItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ComboBoxItem}">

          <Grid Background="{DynamicResource TransparentBrush}">
            <Border x:Name="hoverBorder" BorderBrush="{DynamicResource ButtonHoverOuterBorderBrush}"
                    BorderThickness="1" CornerRadius="2" Background="{DynamicResource ButtonHoverOuterBackgroundBrush}"
                    Visibility="Collapsed">
              <Border Height="Auto" BorderBrush="{DynamicResource ButtonHoverInnerBorderBrush}" BorderThickness="1"
                      CornerRadius="1" Background="{DynamicResource ButtonHoverInnerBackgroundBrush}" />
            </Border>
            <Border x:Name="selectedBorder" BorderBrush="{DynamicResource ButtonHoverOuterBorderBrush}"
                    BorderThickness="1" CornerRadius="2" Background="{DynamicResource ButtonHoverOuterBackgroundBrush}"
                    Visibility="Collapsed">
              <Border Height="Auto" BorderBrush="{DynamicResource ButtonHoverInnerBorderBrush}" BorderThickness="1"
                      CornerRadius="1" Background="{DynamicResource ButtonHoverInnerBackgroundBrush}" />
            </Border>
            <ContentPresenter x:Name="contentPresenter" Margin="3" Opacity="1" />
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5" />
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
              <Setter Property="Visibility" TargetName="selectedBorder" Value="Visible" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
              <Setter Property="Visibility" TargetName="selectedBorder" Value="Visible" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Visibility" TargetName="selectedBorder" Value="Visible" />
            </Trigger>
          </ControlTemplate.Triggers>

        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}" />
  </Style>

  <Style x:Key="NonEditableComboBoxItemStyle" TargetType="{x:Type ComboBoxItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ComboBoxItem}">

          <Grid Background="{DynamicResource TransparentBrush}">
            <Border x:Name="hoverBorder" BorderBrush="{DynamicResource ButtonHoverOuterBorderBrush}"
                    BorderThickness="1" CornerRadius="2" Background="{DynamicResource ButtonHoverOuterBackgroundBrush}"
                    Visibility="Collapsed">
              <Border Height="Auto" BorderBrush="{DynamicResource ButtonHoverInnerBorderBrush}" BorderThickness="1"
                      CornerRadius="1" Background="{DynamicResource ButtonHoverInnerBackgroundBrush}" />
            </Border>
            <Border x:Name="selectedBorder" BorderBrush="{DynamicResource ButtonHoverOuterBorderBrush}"
                    BorderThickness="1" CornerRadius="2" Background="{DynamicResource ButtonHoverOuterBackgroundBrush}"
                    Visibility="Collapsed">
              <Border Height="Auto" BorderBrush="{DynamicResource ButtonHoverInnerBorderBrush}" BorderThickness="1"
                      CornerRadius="1" Background="{DynamicResource ButtonHoverInnerBackgroundBrush}" />
            </Border>
            <ContentPresenter x:Name="contentPresenter" Margin="3" Opacity="1" />
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
              <Setter Property="Visibility" TargetName="selectedBorder" Value="Visible" />
            </Trigger>
          </ControlTemplate.Triggers>

        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}" />
  </Style>
</ResourceDictionary>